package com.pic4493.base;

import com.pic4493.app.R;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class BaseUITopBar extends BaseUI
{
   protected ImageView mImgBack;
   protected TextView mTxtTitle;
   protected ImageView mImgRight;
      
   @Override
   protected void onCreate(Bundle savedInstanceState)
   {
	  super.onCreate(savedInstanceState);
	  mImgBack=(ImageView)findViewById(R.id.topbar_img_back);
	  mImgBack.setOnClickListener(new View.OnClickListener()
	  {
	     @Override
	     public void onClick(View v)
	     {
	  	    onBackPressed(); 
	     }
	  });
	  mImgRight=(ImageView)findViewById(R.id.topbar_img_right);
	  mTxtTitle=(TextView)findViewById(R.id.topbar_txt_title);
   }
   
   protected void setTitle(String title)
   {
	  if(mTxtTitle==null)
	  {
		 mTxtTitle=(TextView)findViewById(R.id.topbar_txt_title);
	  }
	  mTxtTitle.setText(title);
   }
     
}
